<template>
    <view class="bill-container flex fd-c">
        <topBar :back="true">
            <template #center style="width: 100%;">
                <!-- 导航栏 -->
                <view class="nav-bar flex ai-c jc-c">
                    <view class="nav-tabs" style="font-size: 32rpx;font-weight: 700;color: #333;">
                        答题规则
                    </view>
                </view>
            </template>
        </topBar>
        <!-- 内容区域 -->
        <scroll-view class="scrollable-content" scroll-y>
            <rich-text :nodes="content"></rich-text>
        </scroll-view>
    </view>
</template>

<script setup>
import topBar from '@/components/topBar.vue'
import { ref } from 'vue'
import api from '@/api'
import { onLoad } from '@dcloudio/uni-app'
const content = ref('')
onLoad(() => {
    api.getAnnouncementList({
        type: 'article',
    }).then(res => {
        if(res.data.length > 0) {
            content.value = res.data[0].content
        }
    })
})
</script>

<style scoped>
.bill-container {
    height: 100vh;
    background-color: #f7f7f7;
    position: relative;
    display: flex;
    flex-direction: column;
}

.scrollable-content {
    padding: 32rpx;
    box-sizing: border-box;
}

</style>
